i'm studying umbraco a lot of time... I understand the basic of xslt and properties.
I'm building a table in which print the value of an attached file... But if use the upload type of the property i can see and download file. If i, instead, use media picker type of properties i can oly see the id (i.e. 1393) but if click on the link i can't see nothing. I've tried to insert an if cylce recalling media library but nothing.... Help
or if you are passing a node into the macro that has the mpicker property you would replace currentPage with name of that variable. Basically you need to confirm the node context.
im not sure its the variable but it may be the number() bit. I generally use variable because on many occassions i need other properties from the object so rather than making getmedia calls each time (one call is one call to database) i do it once and use the variable.
How to print a mediapicker value [Solved]
Hi to all,
i'm studying umbraco a lot of time... I understand the basic of xslt and properties.
I'm building a table in which print the value of an attached file... But if use the upload type of the property i can see and download file. If i, instead, use media picker type of properties i can oly see the id (i.e. 1393) but if click on the link i can't see nothing. I've tried to insert an if cylce recalling media library but nothing.... Help
Bye
blackdog,
The only thing i can see in code that might be the issue is where you are doing
[code]
umbraco.library:GetMedia(data[@alias='mpicker']
[/code]
are you in a loop? If you are then this should work if you are not then the code needs to be
[code]
umbraco.library:GetMedia($currentPage/data[@alias='mpicker']
[/code]
or if you are passing a node into the macro that has the mpicker property you would replace currentPage with name of that variable. Basically you need to confirm the node context.
Regards
Ismail
Yeah i'm in a loop!
But don't works i don't understand.
I'll try to execute this code but i have an error System.OverflowException: Value was either too large or too small for an Int32.
blackdog,
try changing the false to 'true' see if that works. Also are what version of umbaco are you using?
Regards
Ismail
Thanks for you patience!
I tried to change to true but nothing. I use umbraco 4...
I don't understand. How is it possbile that i have the erro int32. I think the syntax is correct...
Thanks
Blackdog,
I had a similar issue last week here is my code :
[code]
[/code]
See if the above helps.
Ismail
You are great!!!!
It works very well now!!!
I have an answer for you...
Why now it works? Why do you insert a variable?
Anyway thanks very much!
blackdog,
im not sure its the variable but it may be the number() bit. I generally use variable because on many occassions i need other properties from the object so rather than making getmedia calls each time (one call is one call to database) i do it once and use the variable.
Regards
Ismail
is working on a reply...